﻿
#include "unordered_set.hpp"
#include <string>

#include "gtest/gtest.h"
#include <unordered_map>



TEST(MyUnorderedSet, Insert)
{
    SFW::unordered_set<std::string> set;
    ASSERT_EQ(set.insert("hello"), true);
    ASSERT_EQ(set.insert("world"), true);
}

// TEST(HashBucket, erase)
// {
//     SFW::HashBucket<std::string, int>  hashBucket;
//     ASSERT_EQ(hashBucket.insert({"hello", 1}), true);
//     ASSERT_EQ(hashBucket.erase("hello"), true);
//     ASSERT_EQ(hashBucket.erase("hello"), false);
//     ASSERT_EQ(hashBucket.find("hello"), nullptr);
//     ASSERT_EQ(hashBucket.size(), (size_t)0);

//     SFW::HashBucket<int, int> hashBucket2(3);
//     ASSERT_EQ(hashBucket2.insert({1, 4}), true);
//     ASSERT_EQ(hashBucket2.insert({4, 5}), true);
//     ASSERT_EQ(hashBucket2.insert({7, 6}), true);
//     ASSERT_EQ(hashBucket2.erase(7), true);

// }


int main()
{
    ::testing::InitGoogleTest();
    return RUN_ALL_TESTS();
}
